#ifndef KEYBINDMANAGER_H
#define KEYBINDMANAGER_H

#include <qmap.h>
#include <qstring.h>

class Config;

class KeyBindManager
{
public:
	KeyBindManager(Config *);
	~KeyBindManager();
	
	typedef struct key
	{
		int code;
		bool shift;
		key(): code(0x00), shift(false)	{}
		key(int c, bool s = false): code(c), shift(s)	{}
	} Key;
	
	const Key & hostKeyCodeByQtKeyCode(int) const;
	
	void clear();
	bool appendBind(int, const Key &);
	
	typedef QMap<int, Key> BindMap;
	
	const BindMap & bindMap() const;
	
	void setDefaultBind();

private:
	BindMap binds;
	
	Config *config;
};

#endif	// KEYBINDMANAGER_H
